<!--
 * @Author: 码上talk|RC
 * @Date: 2021-08-04 11:46:41
 * @LastEditTime: 2021-10-19 11:34:09
 * @LastEditors: 码上talk|RC
 * @Description: 
 * @FilePath: /ma-portal/subpackage/axq/pages/notice/_id.vue
 * @微信:  13680065830
 * @邮箱:  3189482282@qq.com
 * @oops: Just do what I think it is right
-->
<template>
  <view class="notice-info">
    <uParse :content="noticeIfo.content" :noData="noData" @preview="preview" @navigate="navigate"></uParse>
    <a-btn class="btm-btn" type="primary" size="large" @tap="back">确认阅览</a-btn>
  </view>
</template>

<script>
import uParse from '@/components/gaoyia-parse/parse'
import { model } from '@/model';

const { AxqNotice } = model.collection;
export default {
  components: {
    uParse
  },
  data () {
    return {
      id: '',
      noticeIfo: {},
      noData: '<div style="text-align:center;">~暂无相关公告，请留意后续的通知~</div>'
    }
  },
  onLoad (params) {
    this.id = params.id
    this.getNoticeInfo()
  },
  methods: {
    getNoticeInfo () {
      AxqNotice.sendApi('noticeInfo', {
        params: {},
        data: {
          query: {
            id: this.id
          }
        }
      }).then(res => {
        const {
          status,
          data
        } = res;
        if (status) {
          this.noticeIfo = data
        }
      })
    }
  }
}
</script>

<style lang="less" scoped>
.notice-info {
  height: 100vh;
  background: #f8f6f7;

  .btm-btn {
    position: fixed;
    bottom: 20rpx;
    margin: 0 30rpx;
    /deep/.axq-btn {
      width: 690rpx;
      border-radius: 10rpx;
    }
  }
}
</style>